package com.gzj.springboot.mapper;

import com.gzj.springboot.domain.OftenCities;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface OftenCitiesMapper {
    /**
     * 根据user_name查询出常用城市
     * @param user_name
     * @return
     */
    List<OftenCities> queryCity(@Param("user_name") String user_name);

    /**
     * 添加用户常用的城市
     * @param city
     * @param user_name
     * @return
     */
    int addCity (@Param("city") String city,@Param("user_name") String user_name);

    /**
     * 删除常用城市
     * @param user_name
     * @param city
     * @return
     */
    int deleteCity(@Param("user_name") String user_name,@Param("city") String city);
}
